\(\int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx\) [1493]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 162 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {\left (4 a^2+15 a b+12 b^2\right ) \log (1-\sin (c+d x))}{8 d}+\frac {\left (15 a b-4 \left (a^2+3 b^2\right )\right ) \log (1+\sin (c+d x))}{8 d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d} \]

[Out]

-1/8*(4*a^2+15*a*b+12*b^2)*ln(1-sin(d*x+c))/d+1/8*(-4*a^2+15*a*b-12*b^2)*ln(1+sin(d*x+c))/d-2*a*b*sin(d*x+c)/d
-1/2*b^2*sin(d*x+c)^2/d+1/4*sec(d*x+c)^4*(a+b*sin(d*x+c))^2/d-1/4*sec(d*x+c)^2*(a+b*sin(d*x+c))*(4*a+5*b*sin(d
*x+c))/d

Rubi [A] (verified)

Time = 0.20 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2800, 1659, 1824, 647, 31} \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {\left (4 a^2+15 a b+12 b^2\right ) \log (1-\sin (c+d x))}{8 d}+\frac {\left (15 a b-4 \left (a^2+3 b^2\right )\right ) \log (\sin (c+d x)+1)}{8 d}-\frac {2 a b \sin (c+d x)}{d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d}-\frac {b^2 \sin ^2(c+d x)}{2 d} \]

[In]

Int[(a + b*Sin[c + d*x])^2*Tan[c + d*x]^5,x]

[Out]

-1/8*((4*a^2 + 15*a*b + 12*b^2)*Log[1 - Sin[c + d*x]])/d + ((15*a*b - 4*(a^2 + 3*b^2))*Log[1 + Sin[c + d*x]])/
(8*d) - (2*a*b*Sin[c + d*x])/d - (b^2*Sin[c + d*x]^2)/(2*d) + (Sec[c + d*x]^4*(a + b*Sin[c + d*x])^2)/(4*d) -
(Sec[c + d*x]^2*(a + b*Sin[c + d*x])*(4*a + 5*b*Sin[c + d*x]))/(4*d)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 647

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Dist[e/2 + c*(d/(2*q)),
Int[1/(-q + c*x), x], x] + Dist[e/2 - c*(d/(2*q)), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[(-a)*c]

Rule 1659

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a + c*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + c*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + c
*x^2, x], x, 1]}, Simp[(d + e*x)^m*(a + c*x^2)^(p + 1)*((a*g - c*f*x)/(2*a*c*(p + 1))), x] + Dist[1/(2*a*c*(p
+ 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*c*(p + 1)*(d + e*x)*Q - a*e*g*m + c*d*f*(2*p
+ 3) + c*e*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && NeQ[c*d^2 + a*e^2, 0] &
& LtQ[p, -1] && GtQ[m, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 1824

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^5 (a+x)^2}{\left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}+\frac {\text {Subst}\left (\int \frac {(a+x) \left (-2 b^6-4 a b^4 x-4 b^4 x^2-4 a b^2 x^3-4 b^2 x^4\right )}{\left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^2 d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d}+\frac {\text {Subst}\left (\int \frac {14 a b^6+8 b^4 \left (a^2+2 b^2\right ) x+16 a b^4 x^2+8 b^4 x^3}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d} \\ & = \frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d}+\frac {\text {Subst}\left (\int \left (-16 a b^4-8 b^4 x+\frac {2 \left (15 a b^6+4 b^4 \left (a^2+3 b^2\right ) x\right )}{b^2-x^2}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^4 d} \\ & = -\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d}+\frac {\text {Subst}\left (\int \frac {15 a b^6+4 b^4 \left (a^2+3 b^2\right ) x}{b^2-x^2} \, dx,x,b \sin (c+d x)\right )}{4 b^4 d} \\ & = -\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d}+\frac {\left (4 a^2-15 a b+12 b^2\right ) \text {Subst}\left (\int \frac {1}{-b-x} \, dx,x,b \sin (c+d x)\right )}{8 d}+\frac {\left (4 a^2+15 a b+12 b^2\right ) \text {Subst}\left (\int \frac {1}{b-x} \, dx,x,b \sin (c+d x)\right )}{8 d} \\ & = -\frac {\left (4 a^2+15 a b+12 b^2\right ) \log (1-\sin (c+d x))}{8 d}-\frac {\left (4 a^2-15 a b+12 b^2\right ) \log (1+\sin (c+d x))}{8 d}-\frac {2 a b \sin (c+d x)}{d}-\frac {b^2 \sin ^2(c+d x)}{2 d}+\frac {\sec ^4(c+d x) (a+b \sin (c+d x))^2}{4 d}-\frac {\sec ^2(c+d x) (a+b \sin (c+d x)) (4 a+5 b \sin (c+d x))}{4 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.59 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.01 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {-2 \left (4 a^2+15 a b+12 b^2\right ) \log (1-\sin (c+d x))-2 \left (4 a^2-15 a b+12 b^2\right ) \log (1+\sin (c+d x))+\frac {(a+b)^2}{(-1+\sin (c+d x))^2}+\frac {(a+b) (7 a+11 b)}{-1+\sin (c+d x)}-32 a b \sin (c+d x)-8 b^2 \sin ^2(c+d x)+\frac {(a-b)^2}{(1+\sin (c+d x))^2}-\frac {(7 a-11 b) (a-b)}{1+\sin (c+d x)}}{16 d} \]

[In]

Integrate[(a + b*Sin[c + d*x])^2*Tan[c + d*x]^5,x]

[Out]

(-2*(4*a^2 + 15*a*b + 12*b^2)*Log[1 - Sin[c + d*x]] - 2*(4*a^2 - 15*a*b + 12*b^2)*Log[1 + Sin[c + d*x]] + (a +
 b)^2/(-1 + Sin[c + d*x])^2 + ((a + b)*(7*a + 11*b))/(-1 + Sin[c + d*x]) - 32*a*b*Sin[c + d*x] - 8*b^2*Sin[c +
 d*x]^2 + (a - b)^2/(1 + Sin[c + d*x])^2 - ((7*a - 11*b)*(a - b))/(1 + Sin[c + d*x]))/(16*d)

Maple [A] (verified)

Time = 0.95 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.27

method result size
derivativedivides \(\frac {a^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+2 a b \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{2} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(205\)
default \(\frac {a^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+2 a b \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+b^{2} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(205\)
parallelrisch \(\frac {32 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}+3 b^{2}\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-32 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}+\frac {15}{4} a b +3 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-32 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}-\frac {15}{4} a b +3 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-8 a^{2}-9 b^{2}\right ) \cos \left (2 d x +2 c \right )+6 \left (a^{2}+2 b^{2}\right ) \cos \left (4 d x +4 c \right )-60 a b \sin \left (3 d x +3 c \right )-8 a b \sin \left (5 d x +5 c \right )-20 a b \sin \left (d x +c \right )+b^{2} \cos \left (6 d x +6 c \right )+2 a^{2}-4 b^{2}}{8 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) \(274\)
norman \(\frac {\frac {\left (4 a^{2}+12 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (4 a^{2}+12 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (a^{2}+3 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 \left (a^{2}+3 b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 \left (3 a^{2}+b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {15 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {25 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {11 a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {25 a b \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {15 a b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {\left (a^{2}+3 b^{2}\right ) \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (4 a^{2}-15 a b +12 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 d}-\frac {\left (4 a^{2}+15 a b +12 b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d}\) \(358\)
risch \(3 i b^{2} x +\frac {i a b \,{\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {i a b \,{\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i \left (8 i a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+12 i b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+9 a b \,{\mathrm e}^{7 i \left (d x +c \right )}+8 i a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+16 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+a b \,{\mathrm e}^{5 i \left (d x +c \right )}+8 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+12 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-a b \,{\mathrm e}^{3 i \left (d x +c \right )}-9 a b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{2 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {b^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i a^{2} c}{d}+\frac {6 i b^{2} c}{d}+i a^{2} x -\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}+\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a b}{4 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a b}{4 d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}\) \(389\)

[In]

int(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2*(1/4*tan(d*x+c)^4-1/2*tan(d*x+c)^2-ln(cos(d*x+c)))+2*a*b*(1/4*sin(d*x+c)^7/cos(d*x+c)^4-3/8*sin(d*x+c
)^7/cos(d*x+c)^2-3/8*sin(d*x+c)^5-5/8*sin(d*x+c)^3-15/8*sin(d*x+c)+15/8*ln(sec(d*x+c)+tan(d*x+c)))+b^2*(1/4*si
n(d*x+c)^8/cos(d*x+c)^4-1/2*sin(d*x+c)^8/cos(d*x+c)^2-1/2*sin(d*x+c)^6-3/4*sin(d*x+c)^4-3/2*sin(d*x+c)^2-3*ln(
cos(d*x+c))))

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.10 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {4 \, b^{2} \cos \left (d x + c\right )^{6} - 2 \, b^{2} \cos \left (d x + c\right )^{4} - {\left (4 \, a^{2} - 15 \, a b + 12 \, b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (4 \, a^{2} + 15 \, a b + 12 \, b^{2}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 4 \, {\left (2 \, a^{2} + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + 2 \, b^{2} - 2 \, {\left (8 \, a b \cos \left (d x + c\right )^{4} + 9 \, a b \cos \left (d x + c\right )^{2} - 2 \, a b\right )} \sin \left (d x + c\right )}{8 \, d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/8*(4*b^2*cos(d*x + c)^6 - 2*b^2*cos(d*x + c)^4 - (4*a^2 - 15*a*b + 12*b^2)*cos(d*x + c)^4*log(sin(d*x + c) +
 1) - (4*a^2 + 15*a*b + 12*b^2)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) - 4*(2*a^2 + 3*b^2)*cos(d*x + c)^2 + 2*a
^2 + 2*b^2 - 2*(8*a*b*cos(d*x + c)^4 + 9*a*b*cos(d*x + c)^2 - 2*a*b)*sin(d*x + c))/(d*cos(d*x + c)^4)

Sympy [F(-1)]

Timed out. \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**5*sin(d*x+c)**5*(a+b*sin(d*x+c))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.97 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {4 \, b^{2} \sin \left (d x + c\right )^{2} + 16 \, a b \sin \left (d x + c\right ) + {\left (4 \, a^{2} - 15 \, a b + 12 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (4 \, a^{2} + 15 \, a b + 12 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (9 \, a b \sin \left (d x + c\right )^{3} - 7 \, a b \sin \left (d x + c\right ) + 2 \, {\left (2 \, a^{2} + 3 \, b^{2}\right )} \sin \left (d x + c\right )^{2} - 3 \, a^{2} - 5 \, b^{2}\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1}}{8 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/8*(4*b^2*sin(d*x + c)^2 + 16*a*b*sin(d*x + c) + (4*a^2 - 15*a*b + 12*b^2)*log(sin(d*x + c) + 1) + (4*a^2 +
15*a*b + 12*b^2)*log(sin(d*x + c) - 1) - 2*(9*a*b*sin(d*x + c)^3 - 7*a*b*sin(d*x + c) + 2*(2*a^2 + 3*b^2)*sin(
d*x + c)^2 - 3*a^2 - 5*b^2)/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1))/d

Giac [A] (verification not implemented)

none

Time = 0.50 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.08 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {4 \, b^{2} \sin \left (d x + c\right )^{2} + 16 \, a b \sin \left (d x + c\right ) + {\left (4 \, a^{2} - 15 \, a b + 12 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + {\left (4 \, a^{2} + 15 \, a b + 12 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (3 \, a^{2} \sin \left (d x + c\right )^{4} + 9 \, b^{2} \sin \left (d x + c\right )^{4} + 9 \, a b \sin \left (d x + c\right )^{3} - 2 \, a^{2} \sin \left (d x + c\right )^{2} - 12 \, b^{2} \sin \left (d x + c\right )^{2} - 7 \, a b \sin \left (d x + c\right ) + 4 \, b^{2}\right )}}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{8 \, d} \]

[In]

integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/8*(4*b^2*sin(d*x + c)^2 + 16*a*b*sin(d*x + c) + (4*a^2 - 15*a*b + 12*b^2)*log(abs(sin(d*x + c) + 1)) + (4*a
^2 + 15*a*b + 12*b^2)*log(abs(sin(d*x + c) - 1)) - 2*(3*a^2*sin(d*x + c)^4 + 9*b^2*sin(d*x + c)^4 + 9*a*b*sin(
d*x + c)^3 - 2*a^2*sin(d*x + c)^2 - 12*b^2*sin(d*x + c)^2 - 7*a*b*sin(d*x + c) + 4*b^2)/(sin(d*x + c)^2 - 1)^2
)/d

Mupad [B] (verification not implemented)

Time = 8.18 (sec) , antiderivative size = 377, normalized size of antiderivative = 2.33 \[ \int (a+b \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )\,\left (a^2+3\,b^2\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (a^2-\frac {15\,a\,b}{4}+3\,b^2\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (a^2+\frac {15\,a\,b}{4}+3\,b^2\right )}{d}-\frac {-\frac {15\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{2}+\left (-2\,a^2-6\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {25\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}+\left (4\,a^2+12\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+11\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (12\,a^2+4\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+11\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (4\,a^2+12\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {25\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\left (-2\,a^2-6\,b^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {15\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]

[In]

int((sin(c + d*x)^5*(a + b*sin(c + d*x))^2)/cos(c + d*x)^5,x)

[Out]

(log(tan(c/2 + (d*x)/2)^2 + 1)*(a^2 + 3*b^2))/d - (log(tan(c/2 + (d*x)/2) + 1)*(a^2 - (15*a*b)/4 + 3*b^2))/d -
 (log(tan(c/2 + (d*x)/2) - 1)*((15*a*b)/4 + a^2 + 3*b^2))/d - (tan(c/2 + (d*x)/2)^4*(4*a^2 + 12*b^2) - tan(c/2
 + (d*x)/2)^10*(2*a^2 + 6*b^2) - tan(c/2 + (d*x)/2)^2*(2*a^2 + 6*b^2) + tan(c/2 + (d*x)/2)^6*(12*a^2 + 4*b^2)
+ tan(c/2 + (d*x)/2)^8*(4*a^2 + 12*b^2) + (25*a*b*tan(c/2 + (d*x)/2)^3)/2 + 11*a*b*tan(c/2 + (d*x)/2)^5 + 11*a
*b*tan(c/2 + (d*x)/2)^7 + (25*a*b*tan(c/2 + (d*x)/2)^9)/2 - (15*a*b*tan(c/2 + (d*x)/2)^11)/2 - (15*a*b*tan(c/2
 + (d*x)/2))/2)/(d*(2*tan(c/2 + (d*x)/2)^2 + tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2
)^8 + 2*tan(c/2 + (d*x)/2)^10 - tan(c/2 + (d*x)/2)^12 - 1))